package cn.mrlong.base.ktnet.baseconfig

/**
 * 作者：BINGO
 * 时间：2021/03/26 15:23
 */
data class BaseResponse<T>(
    var code: Int,
    var message: String? = null,
    var success: Boolean = false,
    var data: T? = null
) {

    fun isSuccess(): Boolean {
        return 200 == code
    }

    companion object {
        val FAIL_CODE = -1;
    }
}
data class BaseErrResponse(
    var code: Int,
    var message: String? = null,
    var success: Boolean = false,
) {

    fun isSuccess(): Boolean {
        return 200 == code
    }

    companion object {
        val FAIL_CODE = -1;
    }
}